The correct output of the below code block is - object MyClass { def main(args: Array[String]) { var a : Float = 454.32138988f var b : Double = a; printf("a = " + a + " b = " + b) } }

Scala framework - Online Exam Test Papers | Scala framework - MCQs[multiple choice questions and answers ] | Scala framework - Mock Test Papers | Scala framework - Practice Papers | Scala framework - Sample Test Papers |

Question:
The correct output of the below code block is -

object MyClass {
    def main(args: Array[String]) {
        var a : Float = 454.32138988f
        var b : Double = a;
        
        printf("a = " + a + "	 b = " + b)
    }
}

1.a = 454.32138988 b = 454.32138988152344

2.a = 454.32138 b = 454.3213806152344

3.a = 454.32138 b = 454.32138

4.Error

Posted Date:-2022-11-27 11:09:13


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!